/***************************************************************************
 *   KShootout - online shootout card game.                                *
 *   Copyright (C) 2008, 2009  MacJariel                                   *
 *                                                                         *
 *   KShootout is free software: you can redistribute it and/or modify     *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation, either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   KShootout is distributed in the hope that it will be useful,          *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with KShootout.  If not, see <http://www.gnu.org/licenses/>.    *
 ***************************************************************************/
#ifndef __GAMEWIDGET_H__
#define __GAMEWIDGET_H__

#include "clienttypes.h"
#include <QWidget>

namespace Ui
{
    class GameWidget;
}

namespace client
{
    class Game;
    class PlayerWidget;
    class DeckWidget;
    class GraveyardWidget;
    class CardListWidget;

    class GameWidget: public QWidget
    {
    public:
        explicit GameWidget(const Game* game);
        virtual ~GameWidget();

        /// Returns the deck widget.
        DeckWidget* deckWidget();

        /// Returns the graveyard widget.
        GraveyardWidget* graveyardWidget();

        /// Returns the selection widget.
        CardListWidget* selectionWidget();

        /// Returns the player widget.
        PlayerWidget* playerWidget(int tableIndex);

        /// Changes the type of player widget.
        void setPlayerWidgetType(int tableIndex, PlayerWidgetType type);

    private:
        const Game* const       mp_game;
        Ui::GameWidget*         mp_ui;
        QList<PlayerWidget*>    m_playerWidgetList;
    };
}
#endif // __DEFAULTGAMEWIDGET_H__

